package piirto;

public class PeakList {
    private int[] line_ind1, line_ind2, line_iobs, line_sys, line_inuc;
    private double[] line_Hz, line_int, line_wdth, line_ppm;
    private int size;
    private double highest_peak=0, highest_ppm=1, lowest_ppm=0;
    /**
     * @param args
     */
   //suck my accordian
    public PeakList(int size){
        this.size = size;
        this.line_ind1 = new int[size];
        this.line_ind2 = new int[size];
        this.line_iobs = new int[size];
        this.line_sys = new int[size];
        this.line_inuc = new int[size];
        this.line_Hz = new double[size];
        this.line_int = new double[size];
        this.line_wdth = new double[size];
        this.line_ppm = new double[size];
        
    }
    
    /**
     * 
     * @param line_ind1
     * @param index 
     */
    public void setLine_ind1(int line_ind1, int index) {
        this.line_ind1[index] = line_ind1;
    }
    public int[] getLine_ind1() {
        return line_ind1;
    }
    
    public int getSize(){
        return this.size;
    }
    
    public void setLine_ind2(int line_ind2, int index) {
        this.line_ind2[index] = line_ind2;
    }
    public int[] getLine_ind2() {
        return line_ind2;
    }
    public void setLine_iobs(int line_iobs, int index) {
        this.line_iobs[index] = line_iobs;
    }
    public int[] getLine_iobs() {
        return line_iobs;
    }
    public void setLine_sys(int line_sys, int index) {
        this.line_sys[index] = line_sys;
    }
    public int[] getLine_sys() {
        return line_sys;
    }
    public void setLine_inuc(int line_inuc, int index) {
        this.line_inuc[index] = line_inuc;
    }
    public int[] getLine_inuc() {
        return line_inuc;
    }
    public void setLine_Hz(double line_Hz, int index) {
        this.line_Hz[index] = line_Hz;
        this.line_ppm[index] = line_Hz/500.;
        if(this.line_ppm[index]>this.highest_ppm)
            this.highest_ppm=this.line_ppm[index];
        if(this.line_ppm[index]<this.lowest_ppm)
            this.lowest_ppm=this.line_ppm[index];
    }
    public double[] getLine_Hz() {
        return line_Hz;
    }
    public void setLine_int(double line_int, int index) {
        this.line_int[index] = line_int;
        if(line_int>this.highest_peak)
            this.highest_peak=line_int;

    }
    public double getLine_int(int index) {
        return line_int[index];
    }
    public void setLine_wdth(double line_wdth, int index) {
        this.line_wdth[index] = line_wdth;
    }
    public double[] getLine_wdth() {
        return line_wdth;
    }
    
    public double getLine_ppm(int index){
        return this.line_ppm[index];
    }
    
    public double getHighestPeak(){
        return this.highest_peak;
    }
    
    public double getHighestPpm(){
        return this.highest_ppm;
    }
    public double getLowestPpm(){
        return this.lowest_ppm;
    }

}
